
using System;
using System.Collections.Generic;
using System.Text;

namespace InfiniTec.Security
{
    /// <summary>
    /// This exception is thrown when an attempt is made to activate a privilege
    /// which is not currently held by the logon token.
    /// </summary>
    [global::System.Serializable]
    public class PrivilegeNotHeldException : Exception
    {
        /// <summary>
        /// Creates a new instance of this class.
        /// </summary>
        public PrivilegeNotHeldException() { }
        /// <summary>
        /// Creates a new instance of this class with the specified message
        /// </summary>
        /// <param name="message">The message used for the exception</param>
        public PrivilegeNotHeldException(string message) : base(message) { }
        /// <summary>
        /// Creates a new instance of this class with the specified message and inner exception
        /// </summary>
        /// <param name="message">The message used for the exception</param>
        /// <param name="inner">The inner exception that this instance wraps.</param>
        public PrivilegeNotHeldException(string message, Exception inner) : base(message, inner) { }
        /// <summary>
        /// Creates a new instance of this class using the specified 
        /// <see cref="System.Runtime.Serialization.SerializationInfo"/> and
        /// <see cref="System.Runtime.Serialization.StreamingContext" /> Scope.
        /// </summary>
        /// <param name="info">A <see cref="System.Runtime.Serialization.SerializationInfo"/>.</param>
        /// <param name="scope">A <see cref="System.Runtime.Serialization.StreamingContext" />.</param>
        protected PrivilegeNotHeldException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext scope)
            : base(info, scope) { }
    }
}
